<h1 class="title">
<%
  const sticky = !article.sticky ? '' : '<i class="fas fa-thumbtack"></i> ';
  const attachment = article.attachmentCount===0 ? '' : '<i class="fas fa-paperclip"></i> ';
  const atomName=`<span>${util.escapeHtml(article.atomName)}</span>`;
  const edit=`<span class="article-edit"></span>`;
  echo(`${sticky}${attachment}${atomName}${edit}`);
%>
</h1>
<div class="title stat" data-article-id="<%=article.atomId%>">
<span class="num date"><%=util.formatDateTime(article.createdAt)%></span>
<i class="fas fa-eye"></span><span class="num readCount"></i>
<i class="fas fa-heart"></span><span class="num starCount"></i>
<a href="#comments"><i class="fas fa-comment"></i><span class="num commentCount"></span></a>
<%
  // tags
  let tagsText='';
  const tags=article.atomTags?JSON.parse(article.atomTags):null;
  if(tags && tags.length>0){
    tagsText+='<i class="fas fa-tags"></i> ';
    for(const tagId of tags){
      const tag = await ctx.bean.tag.get({ tagId });
      tagsText+=`<a target="_blank" href="${url('static/articles.html')}?tagId=${tagId}&tagName=${encodeURIComponent(tag.tagName)}"><span class="num tag">${util.escapeHtml(tag.tagName)}</span></a>`;
    }
    tagsText+='';
  }
  echo(tagsText);
%>
</div>
<hr>
